//def patOpenid = ~/([a-z]|[A-Z]|\_|\d){10,50}/
//
//println 'oamO1t_uaUa824rT_pKrmFVSDDt0' ==~ patOpenid

//String str = '''
//<div class="stat-error">
//</div>
//'''
//
//println new String(str.getBytes('ISO-8895-1'), 'utf-8')

import org.apache.commons.codec.digest.DigestUtils

println DigestUtils.shaHex('wo qu!')
return

String str = '83085e9141e4767e6815b9a490263848app_key23078515fieldsnick,user_id,typeformatjsonmethodtaobao.user.seller.getpartner_idtop-sdk-java-20150119session6200930dd9230cfeb1eeb7684e921b3e4c47f4ZZ315e31c55267776sign_methodhmactimestamp2015-01-20 17:12:34v2.083085e9141e4767e6815b9a490263848'

def sign = new StringBuilder()

def bytes =  DigestUtils.md5(str)
println bytes
for(b in bytes){
	String hex = Integer.toHexString(b & 0xFF);
	if (hex.size() == 1) {
		sign << '0'
	}
	sign << hex.toUpperCase()
}
println sign.toString()

println '[124, 118, 15, -104, -15, -94, -34, 109, 57, -57, -41, 54, -122, -29, 66, 64]'
println '7C760F98F1A2DE6D39C7D73686E34240'